#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>

namespace std {
    class Read {
        public:
            template<typename T>
            inline Read & operator >> (T & x) {
                T sum = 0, opt = 1;
                char ch = getchar();
                while(!isdigit(ch)) opt = (ch == '-') ? -1 : 1, ch = getchar();
                while( isdigit(ch)) sum = (sum << 1) + (sum << 3) + (ch ^ 48), ch = getchar();
                x = sum * opt; return *this;
            }
    };
}
#define int long long
#define all(a) a.begin(), a.end()

using namespace std; Read fin;

const int INF = 0x3f3f3f3f3f3f3f3f;

signed main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    int n; fin >> n;

    vector<int> arr(n);

    for (int i = 0; i < n; i ++ )
        fin >> arr[i];
    
    sort(all(arr));

    int posl = 0, posr = 1, res = 0;

    while(posr < n) {
        if (arr[posr] > arr[posl])
            posl += 1, res += 1;
        posr += 1;
    }

    cout << n - res << endl;

    return 0;
}